#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void Bubble(int(*arr)[100], int i)
{
	int n = 0;
	int m = 0;
	for (n; n < i - 1; n++)
	{
		for (m = 0; m < i - n - 1; m++)
		{
			if ((*arr)[m] > (*arr)[m + 1])
			{
				int tmp = (*arr)[m + 1];
				(*arr)[m + 1] = (*arr)[m];
				(*arr)[m] = tmp;
			}
		}
	}
}
void Print(int arr[], int i)
{
	int n = 0;
	for (n; n < i; n++)
	{
		printf("%d ", arr[n]);
	}
}
int Delete(int(*arr)[100], int i)
{
	int arr2[100];
	int n = 1;
	int m = 0;
	int count = i;
	arr2[0] = (*arr)[0];
	while(m<i)
	{
		if (arr2[n-1] != (*arr)[m])
		{
			arr2[n] = (*arr)[m];
			n++;
			m++;
		}
		else
		{
			m++;
			count--;
		}
	}
	for (n = 0; n < count+1; n++)
	{
		(*arr)[n] = arr2[n];
	}
	return count;
}
int main()
{
	int arr[100];
	int i = 0;
	for (i;; i++)
	{
		scanf("%d", &arr[i]);
		if (arr[i] == -1)
			break;
	}
	Bubble(&arr, i);
	int ct = Delete(&arr, i);
	Print(arr,++ct);
	return 0;
}